package com.hrhx.export;

import org.apache.log4j.Logger;


public class PDFExport implements ExportInterface{
	private Logger log = Logger.getLogger(PDFExport.class);
	private OfficeExport officeExport;
	
	public PDFExport(OfficeExport officeExport) {
		super();
		this.officeExport = officeExport; 
	}

	@Override
	public void export() {
		String officePath = officeExport.getOfficePath();
		//导出PDF
		String pdfPath = Jacob2PDF.path2PDF(officePath);  
//		try {
//			log.info("OfficeExport装饰模式开始：PDFExport的export开始执行");
//			DownloadAndUploadUtil.exportDownload(officeExport.getResponse(), pdfPath, officeExport.getOfficeTitle()+".pdf");
//		} catch (IOException e) {
//			log.error("OfficeExport装饰模式失败:"+e.getMessage());
//		} finally{
//			log.info("OfficeExport装饰模式结束：PDFExport的export结束执行");
//		}
	}

}
















